package com.poly.common.core.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum CommonStatus {
    deactivate(0,"停用")
    ,normal(1,"启用");


    /**
     * 值
     */
    private final Integer value;

    /**
     * 名称
     */
    private final String name;

    public static String getName(Integer value) {
        for (CommonStatus item : CommonStatus.values()) {
            if (item.getValue().equals(value)) {
                return item.getName();
            }
        }
        return "";
    }
}
